Vector processing extensions to scalar microprocessor architectures are being implemented to enhance microprocessor performance, particularly with respect to multimedia applications. One such vector processing extension is the Vector Multimedia Extension (VMX) to the POWERPC microprocessor architecture. ("PowerPC" is a trademark of IBM Corporation.) VMX is a single instruction multiple data (SIMD) architecture. In a SIMD architecture, a single instruction operates on multiple sets of operands. For example, in a 128-bit SIMD architecture, an instruction may operate on sixteen 8-bit operands, eight 16-bit operands, four 32-bit operands, or one 128-bit operand.
Logical shift operations within the VMX instruction set require the implementation of a shifter in the microprocessor hardware incorporating the VMX extension. In general, a 128-bit barrel shifter is expensive to implement. Furthermore, in a VMX implementation in which logical shifts do not require a full 128-bit shift, realizing a full 128-bit barrel shifter wastes resources.
Thus, there is a need in the art for a mechanism to implement partial logical shifts in vector processing hardware which obviates the need for a 128-bit barrel shifter.